erratic problems with jdbc driver

Поиск
Список
Период
Сортировка
От Ari Halberstadt
Тема erratic problems with jdbc driver
Дата
Msg-id v04003a01b3a1df1c047c@[207.244.110.165]
обсуждение исходный текст
Список pgsql-interfaces
I've been getting some erratic exceptions in the jdbc driver. About 50% of
the time I get the a stack trace like the following:

java.lang.NullPointerException       at postgresql.util.PSQLException.translate(PSQLException.java:76)       at
postgresql.util.PSQLException.<init>(PSQLException.java:45)      at postgresql.PG_Stream.ReceiveString(Compiled Code)
   at postgresql.Connection.ReceiveFields(Compiled Code)       at postgresql.Connection.ExecSQL(Compiled Code)       at
postgresql.jdbc2.Statement.execute(CompiledCode)       at postgresql.jdbc2.Statement.executeQuery(Compiled Code)
atcom.magiccookie.sql.StatementForwarder.executeQuery(Compiled Code)       at
com.magiccookie.sql.StatementWrapper.executeQuery(CompiledCode)       at com.magiccookie.photodb.Image.match(Compiled
Code)      at com.magiccookie.photodb.Util.makeGalleryThumbnail(Compiled Code)       at
_photography._photodb.___folder_gallery.render(CompiledCode)       at
com.bitmechanic.gsp.GspServlet.renderTemplate(GspServlet.java:576)      at
com.bitmechanic.gsp.GspServlet.service(CompiledCode)       at
javax.servlet.http.HttpServlet.service(HttpServlet.java:588)      at
org.apache.jserv.JServConnection.run(JServConnection.java:359)      at java.lang.Thread.run(Thread.java:485)
 

This is erratic because sometimes the same exact query and code succeed,
but sometimes it fails. I think the NullPointerException is caused by a
null bundle, but this is actually triggered by an earlier exception that
gets lost in the process.

I added a print statement in PSQLException and this is what the
actual error is:
ERROR=postgresql.stream.ioerrorARG=java.net.SocketException: Socket closed

It looks like the socket connection is being lost at random times while
running the query.

The query being run at the time is:
select
adjustments,description,ts,folder,notes,keywords,title,film,location,private,nam
e,ts from photo where id = 158

The calling code is iterating over a list of rows and retrieving info for
each row. It does not always fail when retrieving the same row: though the
query is the same it may be accessing a row with a different ID. You can
see the net effect of this at
<http://www.magiccookie.com/photography/photodb/folder-gallery.gsp>.
Sometimes all of the pictures are displayed, and sometimes only the first
few are displayed.

I had this problem with 6.05b1 and just upgraded to 6.5, but the problem
persists.

Environment: postgresql 6.5, sunos 5.6, Solaris_JDK_1.2.1_03_pre-release.

-- Ari Halberstadt mailto:ari@shore.net <http://www.magiccookie.com/>




В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Steven Bradley
Дата:
Сообщение: triggers and NOTIFY
Следующее
От: "Michael Mooney"
Дата:
Сообщение: pgsqlODBC + Flick's Authentix